Skip to content

LangGraph migration #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Aug 13, 2025
Merged

LangGraph migration #109

merged 25 commits into from
Aug 13, 2025

Conversation

lnhsingh
Copy link
Collaborator

@lnhsingh lnhsingh commented Aug 4, 2025

No description provided.

@beklapko beklapko mentioned this pull request Aug 7, 2025
4 tasks
lnhsingh and others added 11 commits August 8, 2025 11:44
## Summary

Preview link:
https://langchain-5e9cc07a-preview-brodyd-1754925111-e44a21e.mintlify.app/oss/python/overview

This PR does two main things:

1. It reworks the `builder.py` file to generate JS and Python versions
of the docs.
2. It adds CSS and JS files for conditionally hiding the language
picker.

The requirements for the picker are:
- Show the picker when viewing the LangGraph docs
- Hide the picker when viewing the LangGraph Platform or LangChain Labs
docs

## Review requests + info

We're doing custom things on top of Mintlify's stuff. It would be great
if someone can help verify the changes to the `builder.py` file are
acceptable, and although it's not the most elegant solution, that the
CSS and JS files are an acceptable though likely temporary solution.

I tried to update and fix tests appropriately but I really need someone
to validate those changes are good. I haven't fixed/updated unit tests
like this before.

## Todos

- [x] Get this PR reviewed and implement any feedback
- [x] Fix tests
- [ ] Merge with #109
- [ ] 🎉

---------

Co-authored-by: Lauren Hirata Singh <[email protected]>
if url.startswith("/oss/"):
parts = url.split("/")
# Insert full language name after "oss"
parts.insert(2, self.language_url_names[target_language])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this deducing the target language from the fenching? what if a link is outside of a fence?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Links work inside and outside of the fencing. I think we kind of pre-set the languages and just swap them out depending on which version of the docs we're building at the time.

url = match.group(2) # The URL
post = match.group(3) # Everything after the URL

# Only rewrite absolute /oss/ paths
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed that this is also rewriting image paths, which it should ignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for flagging this, pushing a fix now!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lnhsingh lnhsingh marked this pull request as ready for review August 13, 2025 19:57
@lnhsingh lnhsingh requested a review from katmayb as a code owner August 13, 2025 19:57
@lnhsingh lnhsingh merged commit 9f99bb9 into main Aug 13, 2025
8 checks passed
@lnhsingh lnhsingh deleted the migrate-lg branch August 13, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants